﻿/*
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.scriptLoader.load( CKEDITOR.basePath+'paging.js');
CKEDITOR.document.appendStyleSheet( CKEDITOR.basePath+'paging.css');

//CKEDITOR.config.extraPlugins = 'paging';
//CKEDITOR.config.protectedSource.push( /<\s*span[\s\S]*?\/span\s*>/gi ) ; // <span> tags.

CKEDITOR.editorConfig = function( config )
{	
	// Define changes to default configuration here. For example:
	//根据浏览器自动适应语言
	//config.language = 'zh-cn';
	config.uiColor = '# 9AB8F3';
	config.skin = 'kama';
	config.enterMode = CKEDITOR.ENTER_BR;
	CKEDITOR.on( 'instanceReady', function( ev )
    {
        var editor = ev.editor;
		// Output paragraphs as Text.
		editor.dataProcessor.writer.setRules( 'p',
		    {
		        indent : false,
		        breakBeforeOpen : false,
		        breakAfterOpen : false,
		        breakBeforeClose : false,
		        breakAfterClose : false
		    });
		
    });
};

function pageinit(editorname)
{	
	Paging.init(editorname);
	CKEDITOR.document.appendStyleSheet( CKEDITOR.basePath+'paging.css');
}

function pagecreate()
{
	Paging.create();
}
function pageremove()
{
	Paging.remove();
}
function pageunite()
{
	Paging.unite();
}
